input number maxlength

120

html input integer and positive -

<input type="number" min="0" step="1" />

input number maxlength -

<form method="post">
      <label for="myNumber">My Number:</label>
      <input type="number" maxlength="9" required
      oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" >
     <br><br>
      <input type="submit" value="Submit">
</form>

input max length -

<input maxlength="10" />

how to limit input type max length -

<input name="somename"
    oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
    type = "number"
    maxlength = "6"
 />

input type number maxlength -

<input type="text" pattern="\d*" maxlength="4">

Comments

Submit
0 Comments